/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package javaapplication1;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Educacionit
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws IOException {

        File archivo = new File("entrada.txt");
        FileReader in = null;
        BufferedReader reader = null;

        System.out.println(archivo.getAbsolutePath());
        try {
            in = new FileReader(archivo);
            reader = new BufferedReader(in);

            while (reader.ready()) {
                char c = (char) reader.read();
                System.out.print(c);
            }
            System.out.println();

        } catch (IOException ex) {
            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
            ex.printStackTrace();
        } finally {
            reader.close();
            in.close();
        }
    }
}
